package client.global.commlib.toast

import client.global.commlib.ContextProvider

fun toast(message: String?, error: Int = 0) {
    ToastFactory.get().createToast(message)
//    MyToast.instance.show(message)
//    Toast.makeText(App.getInstance().applicationContext, message, Toast.LENGTH_SHORT).show()
    if (error == 401) {
        offline()
    }
}

fun offline() {
    ContextProvider.get().logoutRun()
}